﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Pages/Inicio.master" AutoEventWireup="false" CodeFile="OrdenServicioRegistroOnSite.aspx.vb" Inherits="Pages_Default" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register src="../UserControl/ClienteRegistro.ascx" tagname="ClienteRegistro" tagprefix="uc1" %>
<%@ Register Src="~/UserControl/ClienteListado.ascx" TagPrefix="uc1" TagName="ClienteListado" %>
<%@ Register Src="~/UserControl/SedeRegistro.ascx" TagPrefix="uc1" TagName="SedeRegistro" %>
<%@ Register Src="~/UserControl/ContactoRegistro.ascx" TagPrefix="uc1" TagName="ContactoRegistro" %>
<%@ Register Src="~/UserControl/SolicitudRepuestos.ascx" TagPrefix="uc1" TagName="SolicitudRepuestos" %>
<%@ Register Src="~/UserControl/EquipoRegistro.ascx" TagPrefix="uc1" TagName="EquipoRegistro" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:Button ID="btnNueoHide" runat="server"  style="display:none" />
    <asp:ModalPopupExtender ID="popupNuevoCliente" runat="server" BackgroundCssClass="transparenciapopup" TargetControlID="btnNueoHide" PopupControlID="panelNuevoCliente">
    </asp:ModalPopupExtender>
    <asp:Panel ID="panelNuevoCliente" runat="server" style="display:none">
        <asp:UpdatePanel ID="uppNuevoCliente" runat="server">
            <ContentTemplate>
                <div class="textright"><asp:ImageButton ID="ibtnCerrarRegistroCliente" runat="server" ImageUrl="~/Images/img/cerrar.png" style="width: 20px"></asp:ImageButton></div>
                <div style="background-color:white; border-color:navy; border-width:2px">
                <uc1:ClienteRegistro ID="ClienteRegistro1" runat="server" /></div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>

    <asp:Button ID="btnBuscarClienteHide" runat="server" style="display:none" />
    <asp:ModalPopupExtender ID="popupBuscarCliente" runat="server" BackgroundCssClass="transparenciapopup" TargetControlID="btnBuscarClienteHide" PopupControlID="panelBuscarCliente">
    </asp:ModalPopupExtender>
    <asp:Panel ID="panelBuscarCliente" runat="server" Style="display:none">
        <asp:UpdatePanel ID="uppBuscarCliente" runat="server">
            <ContentTemplate>
                <div class="textright"><asp:ImageButton ID="ibtnCerrarBuscarCliente" runat="server" ImageUrl="~/Images/img/cerrar.png" style="width: 20px"></asp:ImageButton></div>
                <div style="background-color:white; border-color:navy; border-width:2px">
                    <uc1:ClienteListado runat="server" ID="ClienteListado1" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>

    <asp:Button ID="btnNuevaSede" runat="server" style="display:none"/>
    <asp:ModalPopupExtender ID="popupNuevaSede" runat="server" BackgroundCssClass="transparenciapopup" TargetControlID="btnNuevaSede" PopupControlID="panelSede">
    </asp:ModalPopupExtender>
    <asp:Panel ID="panelSede" runat="server" style="display:none">
        <asp:UpdatePanel ID="uppSede" runat="server">
            <ContentTemplate>
                <div class="textright"><asp:ImageButton ID="ibtnCerrarSede" runat="server" ImageUrl="~/Images/img/cerrar.png" style="width: 20px"></asp:ImageButton></div>
                 <div style="background-color:white; border-color:navy; border-width:2px">
                    <uc1:SedeRegistro runat="server" ID="SedeRegistro1" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>

    <asp:Button ID="btnNuevoContactoHide" runat="server" Style="display:none" />
    <asp:ModalPopupExtender ID="popupNuevoContacto" runat="server" BackgroundCssClass="transparenciapopup" TargetControlID ="btnNuevoContactoHide" PopupControlID="panelContacto">
    </asp:ModalPopupExtender>
    <asp:Panel ID="panelContacto" runat="server" style="display:none">
        <asp:UpdatePanel ID="uppContacto" runat="server">
            <ContentTemplate>
                <div class="textright"><asp:ImageButton ID="ibtnCerrarContacto" runat="server" ImageUrl="~/Images/img/cerrar.png" style="width: 20px"></asp:ImageButton></div>
                <div style="background-color:white; border-color:navy; border-width:2px">
                    <uc1:ContactoRegistro runat="server" ID="ContactoRegistro1" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>

    <asp:Button ID="btnSolicitudRep" runat="server" style="display:none "/>
    <asp:ModalPopupExtender ID="popupSolicitudRepuesto" runat="server" BackgroundCssClass="transparenciapopup" TargetControlID="btnSolicitudRep" PopupControlID="panelRepuesto">
    </asp:ModalPopupExtender>
    <asp:panel ID="panelRepuesto" runat="server" style="display:none">
        <asp:UpdatePanel ID="uppRepuesto" runat="server">
            <ContentTemplate>
                <div class="textright"><asp:ImageButton ID="ibtnCerrarRepuestos" runat="server" ImageUrl="~/Images/img/cerrar.png" style="width: 20px"></asp:ImageButton></div>
                <div style="background-color:white; border-color:navy; border-width:2px">
                    <uc1:SolicitudRepuestos runat="server" ID="SolicitudRepuestos" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:panel>

    <asp:UpdatePanel ID="uppRegistroOrden" runat="server">
        <ContentTemplate>
            <br />
            <div class="estandardiv">
                <asp:Panel ID="pnGeneralOrden" runat="server" Visible="false" CssClass="textcenter" >
                    <center>
                    <table style="width:750px">
                        <tr class="subtittle2" ><td class="textleft">Orden : <asp:Label ID="lblOrden" runat="server" Font-Bold="True" CssClass="textleft" ForeColor="Black"></asp:Label></td>
                            <td class="textcenter">Fecha : 
                                <asp:Label runat="server" ID="lblFecha" Font-Bold="True" ForeColor="Black"></asp:Label>
                            </td>
                            <td class="textright">Estado : 
                                <asp:Label ID="LblEstado" runat="server" Font-Bold="True" ForeColor="Black"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    </center>
                </asp:Panel>
                    <center>
                    <table style="width:750px;">
                    <tr>
                        <td class="tittlecell" colspan="6">Datos de Orden de Servicio</td>
                    </tr>
                    <tr>
                        <td class="textright">Categoría</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbCategoria" runat="server" CssClass="textleft" Width="130px">
                            </asp:DropDownList>
                        </td>
                        <td class="textright">Tipo Servicio</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbTipoServicio" runat="server" CssClass="textleft" Width="150px" AutoPostBack="True">
                            </asp:DropDownList>
                        </td>
                        <td class="textright">Tipo Revisión</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbTipoRevision" runat="server" CssClass="textleft" Width="140px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="textright">
                            <asp:DropDownList ID="ddlbModalidadServicio" runat="server" CssClass="textleft" Width="20px" Visible="false">
                            </asp:DropDownList>Prioridad</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbPrioridad" runat="server" CssClass="textleft" Width="130px">
                            </asp:DropDownList>
                        </td>
                        <td class="textright">Proyecto</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbProyecto" runat="server" CssClass="textleft" Width="150px">
                            </asp:DropDownList>
                        </td>
                        <td class="textright">Vendedor</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbVendedor" runat="server" CssClass="textleft" Width="140px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="textright">Garantía</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbGarantia" runat="server" CssClass="textleft" Width="130px">
                            </asp:DropDownList>
                        </td>
                        <td class="textright">Número caso</td>
                        <td class="textleft">
                            <asp:TextBox ID="txbCaso" runat="server" CssClass="textleft" Width="139px"></asp:TextBox>
                        </td>
                        <td class="textright">
                            Código Ref.</td>
                        <td class="textleft">
                            <asp:TextBox ID="txbReferenciaCodigo" runat="server" CssClass="textleft" Width="134px"></asp:TextBox>
                        </td>
                    </tr>
                        <tr>
                            <td class="textright">&nbsp;</td>
                            <td class="textleft">&nbsp;</td>
                            <td class="textright">&nbsp;</td>
                            <td class="textleft">&nbsp;</td>
                            <td class="textright">
                                <asp:Label ID="LblCondicionEstado" runat="server" Text="Condición"></asp:Label>
                            </td>
                            <td class="textleft">
                                <asp:DropDownList ID="ddlbEstadoOnSite" runat="server" AutoPostBack="True" CssClass="textleft" Width="140px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                </table>
                     <br />
                    <table style="width:750px">
                    <tr><td colspan="4" class="tittlecell">Datos del Cliente</td></tr>
                    <tr><td colspan="4" class="textleft">
                        <asp:ImageButton ID="ibtnNuevoCliente" runat="server" ImageUrl="~/Images/texto/btnAgregar.png" />
                        &nbsp;<asp:ImageButton ID="ibtnBuscarCliente" runat="server" ImageUrl="~/Images/texto/btnBuscar.png" />
                        </td></tr>
                    <tr><td colspan="4">
                        <table style="width:100%">
                                    <tr>
                                        <td class="textleft" colspan="4">
                                            <asp:RadioButtonList ID="rbTipoCliente" runat="server" AutoPostBack="True" CssClass="textleft" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                            </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="textright">Cliente</td>
                                        <td class="textleft">
                                            <asp:DropDownList ID="ddlbCliente" runat="server" AutoPostBack="True" CssClass="textleft" Width="400px">
                                            </asp:DropDownList>
                                        </td>
                                        <td class="textright">Documento</td>
                                        <td class="textleft">
                                            <asp:TextBox ID="txbDocumento" runat="server" CssClass="textleft" Width="130px"></asp:TextBox>
                                            <asp:ImageButton ID="ibtnBuscarDocumento" runat="server" ImageUrl="~/Images/img/buscar.png" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="textright">Sede</td>
                                        <td class="textleft" colspan="3">
                                            <asp:DropDownList ID="ddlbSedeCliente" runat="server" AutoPostBack="True" CssClass="textleft" Width="400px">
                                            </asp:DropDownList>
                                            &nbsp;<asp:ImageButton ID="ibtnNuevaSede" runat="server" ImageUrl="~/Images/img/agregaRegistro.png" ToolTip="Nueva Sede" Visible="False" />
                                            &nbsp;<asp:ImageButton ID="ibtnEditarSede" runat="server" ImageUrl="~/Images/img/editarRegistro.png" Visible="False" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="textright">Contacto</td>
                                        <td class="textleft" colspan="3">
                                            <asp:DropDownList ID="ddlbContactoCliente" runat="server" CssClass="textleft" Width="400px" AutoPostBack="True">
                                            </asp:DropDownList>
                                            &nbsp;<asp:ImageButton ID="ibtnNuevoContacto" runat="server" ImageUrl="~/Images/img/agregaRegistro.png" ToolTip="Nuevo Contacto" Visible="False" style="width: 16px" />
                                            &nbsp;<asp:ImageButton ID="ibtnEditarContacto" runat="server" ImageUrl="~/Images/img/editarRegistro.png" ToolTip="Editar Contacto" Visible="False" style="width: 16px" />
                                        </td>
                                    </tr>
                                </table>
                        </td></tr>
                </table>
                    <br />
                    <table style="width:750px">
                    <tr><td class="tittlecell">Datos de Tienda / Proveedor</td></tr>
                    <tr><td>
                        <table style="width:100%">
                            <tr><td class="textright" style="width:75px">Tienda</td>
                                <td class="textleft">
                                    <asp:DropDownList ID="ddlbCourier" runat="server" AutoPostBack="True" CssClass="textleft" Width="350px">
                                    </asp:DropDownList>
                                </td></tr>
                            <tr><td class="textright">Dirección</td>
                                <td class="textleft">
                                    <asp:DropDownList ID="ddlbSedeCourier" runat="server" CssClass="textleft" Width="350px" AutoPostBack="True">
                                    </asp:DropDownList>
                                </td></tr>
                            <tr>
                                <td class="textright">Contacto</td>
                                <td class="textleft"><asp:DropDownList ID="ddlbContactoCourier" runat="server" width="350px" CssClass="textleft"></asp:DropDownList></td>
                            </tr>
                           </table            
                        </td>
                        </tr>
                    </table>
                </center>
                <asp:Panel ID="pnAgenda" runat="server">
                    <center>
                    <table style="width:750px">
                            <tr><td colspan="4" class="subtittle2"><asp:CheckBox ID="cbAgendar" runat="server" AutoPostBack="True" Text="Agendar Servicio"></asp:CheckBox>
                                <asp:Label ID="LblAlerta" runat="server" Font-Bold="True" Font-Names="10" ForeColor="Red" Text="**" Visible="False"></asp:Label>
                                </td></tr>
                            <tr><td class="textright">Fecha</td>
                                <td class="textleft">
                                    <asp:TextBox ID="txbFechaAgenda" runat="server" CssClass="textleft" Width="90px" TextMode="Date" Enabled="False"></asp:TextBox>
                                    <asp:CalendarExtender ID="txbFechaAgenda_CalendarExtender" runat="server" Enabled="True" TargetControlID="txbFechaAgenda" Format="dd/MM/yyyy">
                                    </asp:CalendarExtender>
                                    <asp:Label ID="LblCodigoAgenda" runat="server" Visible="False"></asp:Label>
                                </td>
                                <td class="textright">Hora</td>
                                <td class="textleft">
                                    <asp:TextBox ID="txbHora" runat="server" CssClass="textleft" TextMode="Time" Width="90px" MaxLength="5" Enabled="False"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </center>
                </asp:Panel>
                <br />
                <center>
                    <table style="width:750px">
                    <tr><td colspan="6" class="tittlecell" >Datos del Equipo</td></tr>
                    <tr><td class="textright" style="width:50px">Serie</td>
                        <td colspan="5" class="textleft">
                        <asp:TextBox ID="txbSerieEquipo" runat="server" CssClass="textleft" Width="170px"></asp:TextBox>
                        <asp:ImageButton ID="imgBuscarSerieEquipo" runat="server" ImageUrl="~/Images/img/buscar.png" />
                            &nbsp;<asp:ImageButton ID="ibtnEditarEquipo" runat="server" ImageUrl="~/Images/img/editarRegistro.png" ToolTip="Editar Datos de Equipo" Visible="False" style="width: 16px; " />
                            &nbsp;<asp:ImageButton ID="ibtnLimpiar" runat="server" ImageUrl="~/Images/img/limpiar.png" ToolTip="Limpiar Campos - Equipo" />
                        </td>
                    </tr>
                    <tr>
                        <td class="textright">Familia</td>
                        <td class="textleft"><asp:DropDownList ID="ddlbFamilia" runat="server" CssClass="textleft" Width="200px" AutoPostBack="True">
                        </asp:DropDownList>
                        </td>
                        <td class="textright">Tipo Equipo</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbTipoEquipo" runat="server" CssClass="textleft" Width="200px" AutoPostBack="True">
                            </asp:DropDownList>
                        </td>
                        <td class="textright">Marca</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbMarca" runat="server" CssClass="textleft" Width="170px" AutoPostBack="True">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="textright">Modelo</td>
                        <td class="textleft"><asp:DropDownList ID="ddlbModelo" runat="server" CssClass="textleft" Width="200px" AutoPostBack="True">
                            </asp:DropDownList></td>
                        <td class="textright">Part Number</td>
                        <td class="textleft"><asp:TextBox ID="txbPartNumber" runat="server" CssClass="textleft" Width="150px"></asp:TextBox>
                            <asp:ImageButton ID="imgBuscarPartNumber" runat="server" ImageUrl="~/Images/img/buscar.png" style="width: 16px" />
                        </td>
                        <td class ="textright" >Licencia</td>
                        <td class="textleft">
                            <asp:DropDownList ID="ddlbLicencia" runat="server" CssClass="textleft" Width="170px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="textright">&nbsp;</td>
                        <td class="textleft"><asp:CheckBox ID="cbEquipoRobo" runat="server" Text="Equipo Extravíado" />
                        </td>
                        <td class="textright">&nbsp;</td>
                        <td class="textleft">&nbsp;</td>
                        <td class="textright"></td>
                        <td>
                            <asp:Label ID="LblCodigoEquipo" runat="server" Visible="False"></asp:Label>
                        </td>
                    </tr>
                </table>
                    <br />
                    <table style="width:750px">
                    <tr><td class="bordeobs" >Falla</td>
                        <td class="textleft">
                        <asp:DropDownList ID="ddlbFalla" runat="server" CssClass="textleft" Width="200px">
                        </asp:DropDownList></td></tr>
                    <tr><td class="bordeobs" style="width:75px" >Detalle</td>
                        <td class="textleft">
                        <asp:TextBox ID="txbFalla" runat="server" Height="38px" TextMode="MultiLine" Width="631px"></asp:TextBox>
                        </td></tr>
                </table>
                    <br />
                    <table style="width:750px">
                    <tr><td class="bordeobs" style="width:70px">Observaciones</td><td class="textleft">
                            <asp:TextBox ID="txbObservaciones" runat="server" Height="70px" TextMode="MultiLine" Width="632px"></asp:TextBox>
                        </td></tr>
                    <tr>
                        <td class="bordeobs">&nbsp;</td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr><td colspan="2">
                        <asp:ImageButton ID="ibtnGrabar" runat="server" ImageUrl="~/Images/texto/btnGrabar.png" />
                        &nbsp;<asp:ImageButton ID="ibtnModificar" runat="server" ImageUrl="~/Images/texto/btnModificar.png" Visible="False" />
                        &nbsp;<asp:ImageButton ID="ibtnImprimir" runat="server" ImageUrl="~/Images/texto/btnImprimir.png" Visible="False" />
                        &nbsp;<asp:ImageButton ID="ibtnRpuestos" runat="server" ImageUrl="~/Images/texto/btnRepuestos.png" Visible="False" />
                        &nbsp;<asp:ImageButton ID="ibtnCancelar" runat="server" ImageUrl="~/Images/texto/btnRegresar.png" />
                        </td></tr>
                </table>
                </center>
            </div>
            
        </ContentTemplate>
    </asp:UpdatePanel>  

    </asp:Content>